/*
 * CustomerBO.java
 *
 * Created on February 12, 2007, 9:10 PM
 *
 */

package edu.byu.isys413.group1E.data;

/** This class contains the data needed for Area of Interest objects.
 *
 * @author Travis Kulbeth
 */
public class AreaOfInterestBO {
    
    private String AOI_ID;
    private String description;
    private boolean alreadyInDB;
    private boolean isDirty;
    
    /** Creates a new instance of AreaOfInterestBO 
     *@param AOI_ID contains a previously created AOI_ID.
     */
    AreaOfInterestBO(String AOI_ID) {
        setAOI_ID(AOI_ID);
        setIsDirty(true);
    }
    
    /** Creates a new instance of AreaOfInterestBO using previously stored AOI data.
     *@param AOI_ID contains the id of the AOI object.
     *@param description contains the description of the AOI.
     */
    AreaOfInterestBO(String AOI_ID, String description) {
        setAOI_ID(AOI_ID);
        setDescription(description);
    }

    /** Returns the AOI_ID
     * 
     * @return AOI_ID
     */
    public String getAOI_ID() {
        return AOI_ID;
    }

    /** Sets the AOI_ID
     * 
     * @param AOI_ID contains the AOI_ID for this object
     */
    public void setAOI_ID(String AOI_ID) {
        setIsDirty(true);
        this.AOI_ID = AOI_ID;
    }

    /** Returns the description
     * 
     * @return description
     */
    public String getDescription() {
        return description;
    }

    /** Sets the description
     * 
     * @param description contains the description for this AOI.
     */
    public void setDescription(String description) {
        setIsDirty(true);
        this.description = description;
    }

    /** Returns if this AOI is already stored in the DB.
     * 
     * @return alreadyInDB
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    /** Sets if the AOI is already in the DB
     * 
     * @param alreadyInDB indicates if this AOI has been stored in the DB.
     */
    public void setAlreadyInDB(boolean alreadyInDB) {
        setIsDirty(true);
        this.alreadyInDB = alreadyInDB;
    }

    /** Returns if the AOI's information has been changed.
     * 
     * @return isDirty
     */
    public boolean isIsDirty() {
        return isDirty;
    }

    /** Sets the variable to indicate that info has been changed.
     * 
     * @param isDirty indicates that info has been changed
     */
    public void setIsDirty(boolean isDirty) {
        this.isDirty = isDirty;
    }
}
